/*
 * @Date: 2022-11-24 11:45:21
 * @LastEditors: sailornpg
 * @LastEditTime: 2022-11-24 11:48:09
 * @FilePath: \vue-admin-ts\src\utils\tools\index.ts
 * @Description: tools
 */
import dayjs from "dayjs";
import utc from "dayjs/plugin/utc";
dayjs.extend(utc);
const DATE_FORMAT = "YYYY-MM-DD HH:mm:ss";
//日期格式
export const DateFormat = (utcString: string, format: string = DATE_FORMAT) => {
  return dayjs.utc(utcString).format(format);
};
